package com.jt.redis.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@PropertySource(value = "classpath:/properties/redis.properties",encoding = "utf-8")
public class RedisController {
    @Value("${redis.host2}")
    private String host;/*="127.0.0.1";*/
    @Value("${redis.port2}")
    private int port;/*=7615;*/

    @RequestMapping("/getNode")
    public String getNode(){
        return host+"/|?"+port;
    }
}
